package com.keti.controller;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.keti.Dao.stuffDao;
import com.keti.DaoImpl.suffDaoImpl;
import com.keti.pojo.stuff;

/**
 * Servlet implementation class UserInterfaceServlet
 */
@WebServlet("/UserInterfaceServlet")
public class UserInterfaceServlet extends HttpServlet {

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		stuffDao s = new suffDaoImpl();
		List<stuff> list = new ArrayList<stuff>();
		list = s.queryAll();
		request.setAttribute("list", list);
		request.getRequestDispatcher("/jsp"
				+ "/UserInterface.jsp").forward(request, response);
		
	}
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
		doGet(request, response);
	}

}
